package map
{
	
	
	
	public class MapConfig
	{
		public static var FLAG_WALK:int = 0;	//可以走
		public static var FLAG_CLOSE:int = 1;	//不可以走
		public static var FLAG_ALPHA:int = 2;	//透明
		
		public static var cellWidth:int = 40;
		public static var cellHeight:int = 20;
		public static var connectedPointY:int;
		public static var xLen:int;
		public static var yLen:int;
		
		public static var cellLen:Number;
		public static var walkStepDistance:Array;
		private static var SQRT_5:Number = Math.sqrt(5);
		//人物每秒移动的速度,单位:7像素,即:156.5247584249853
		//rgq 修改后8 像素
		public static const WALK_SPEED_BASE:Number = 8 * SQRT_5 * 10 / 1000;
		public static const WALK_STEP_DELTA:Array = [[0, 0], 
			[0, -1], 
			[(2 / SQRT_5), (-1 / SQRT_5)], 
			[1, 0], 
			[(2 / SQRT_5), (1 / SQRT_5)], 
			[0, 1], 
			[(-2 / SQRT_5), (1 / SQRT_5)], 
			[-1, 0], 
			[(-2 / SQRT_5), (-1 / SQRT_5)]];
		public function MapConfig()
		{
			
		}
		public static function update():void
		{
			cellLen = Math.sqrt(Math.pow(cellWidth, 2) + Math.pow(cellHeight, 2)) / 2;
			walkStepDistance = [0, cellHeight, cellLen, cellWidth, cellLen, cellHeight, cellLen, cellWidth, cellLen];
		}
		
	}
}